<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="java.util.*"%>

<%!
    String err;
    String email;
%>

<html>
    <head>
        <%@include file="headtags.html"%>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Distributed IT Help Desk - Index</title>
    </head>
    <body>
        <h1 align="center"><img src="images/heading.png" width="387" height="56" alt="Distributed IT Help Desk" /></h1>

        <%

        if (request.getAttribute("error") != null)
        {
            err = (String)request.getAttribute("error");
        }
        else
            err = "";

        if (request.getAttribute("email") != null)
        {
            email = (String)request.getAttribute("email");
        }
        else email = "";

        %>

        <%= err %>

        <form name="login_form" method="post" action="login.jsp">
            <table class="login" align="center">
                <tr>
                    <td>Email</td>
                    <td><input type="text" name="email" value="<%= email %>" /></td>
                </tr>
                <tr>
                    <td>Password</td>
                    <td><input type="password" name="password" /></td>
                </tr>
                <tr><td><input type="submit" name="Submit" value="Login"/></td><td align="right"><a href="register.jsp">Not registered?</a></td></tr>
            </table>
        </form>

    </body>
</html>
